# $Id $

sysconfdir=@sysconfdir@
piddir=@piddir@
srcdir=@srcdir@
top_srcdir=@top_srcdir@

VPATH=@srcdir@
CC=@CC@
LD=@LD@
BCRYPTFLAGS=-I/usr/include/w32api
CFLAGS=@CFLAGS@ 
CPPFLAGS=-I. -I../../.. -I$(srcdir) -I$(top_srcdir) -I$(srcdir)/includes @CPPFLAGS@ @DEFS@ -DUSE_MSCNG
LIBS=@LIBS@ -lbcrypt
AR=@AR@
RANLIB=@RANLIB@
INSTALL=@INSTALL@
LDFLAGS=-L. @LDFLAGS@ -L/lib/win32api

WIN32COMPATFILES = daemon.o gettimeofday.o homedirhelp.o pwd.o sfds.o \
	socket.o startupneeds.o strcasecmp.o syslog.o lsalogon.o lsastring.o \
	stringhelp.o deskright.o win32auth.o kerberos.o cng_cipher.o ansiprsr.o \
	console.o tnnet.o conio.o tncon.o

WIN32COMPATLIB=@LIBWIN32COMPAT@

CNGFILES=cng_cipher.o cng_digest.o


.c.o:
	$(CC) $(CFLAGS) $(CPPFLAGS) -c $<

all: $(WIN32COMPATLIB)

$(CNGFILES): %.o: %.c
	$(CC) $(CFLAGS) $(BCRYPTFLAGS) $(CPPFLAGS) -c $<

install:

clean:
	rm -f *.o *.a core

distclean: clean
	rm -f Makefile *~

$(WIN32COMPATFILES): ../../../config.h

$(WIN32COMPATLIB): $(WIN32COMPATFILES) $(CNGFILES)
	$(AR) rv $@ $(WIN32COMPATFILES) $(CNGFILES)
	$(RANLIB) $@
